<!--
 * @Author: nns4
 * @Date: 2020-12-11 13:28:59
 * @LastEditors: nns4
 * @FilePath: /studyNote/vue/src/views/test/sendInfo/vueBus/daughter.vue
 * @Description: 儿子组件
-->
<template>
    <div class="son">
        <div class="borders">
            女儿说： <input v-model="说的话" @keyup="callBack" type="text">
        </div>

    </div>
</template>


<script>
    import vueBus from "./vueBus"
    export default {
        data() {
            return {
                说的话: ""
            }
        },
        methods: {
            callBack() {
                vueBus.$emit('女儿组件说', this.说的话)
            }
        }

    }
</script>

<style lang="less" scoped>
    .son {
        margin: 20px;
    }

    .borders {
        border: red solid;
    }
</style>